package com.xjcs.saplingplan.utils

import android.content.Context
import com.lxj.xpopup.XPopup

object DialogUtils {

    /**
     * 基础弹窗
     */
    fun showBasePop(
        context: Context,
        outDismiss: Boolean = true,
        showBg: Boolean = true
    ): XPopup.Builder {
        return XPopup.Builder(context)
            .dismissOnTouchOutside(outDismiss)
            .isDestroyOnDismiss(true)
            .hasShadowBg(showBg)
            .isLightStatusBar(true)
            .hasNavigationBar(true)
            .dismissOnBackPressed(outDismiss)
            .enableDrag(false)
    }

    fun showAttachPop(
        context: Context,
        outDismiss: Boolean = true,
        showBg: Boolean = true
    ): XPopup.Builder {
        return XPopup.Builder(context).enableDrag(false).dismissOnTouchOutside(outDismiss).hasShadowBg(showBg).isDestroyOnDismiss(true)
    }

}